<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="/styles/general.css"/>
<link rel="stylesheet" type="text/css" href="/styles/main.css"/>
<link rel="stylesheet" type="text/css" href="/styles/pager.css"/>
<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/js/jquery.jeditable.mini.js" type="text/javascript"></script> 
<script src="/js/jquery.pager.js" type="text/javascript"></script> 
<script type="text/javascript" language="javascript"> 
jQuery.extend({
	g:function() {
	   var day = new Date();
	   var Year = 0;
	   var Month = 0;
	   var Day = 0;
	   var CurrentDate = "";
	   //初始化时间
	   //Year       = day.getYear();//有火狐下2008年显示108的bug
	   Year       = day.getFullYear();//ie火狐下都可以
	   Month      = day.getMonth()+1;
	   Day        = day.getDate();   
	   CurrentDate += Year + "-";   
	   if (Month >= 10 )
	   {
	    CurrentDate += Month + "-";
	   }
	   else
	   {
	    CurrentDate += "0" + Month + "-";
	   }
	   if (Day >= 10 )
	   {
	    CurrentDate += Day ;
	   }
	   else
	   {
	    CurrentDate += "0" + Day ;
	   }
	   return CurrentDate;
	},
	next:function(){
		if(index>=obj.length){
			$("#divtablelist").prepend("生成完毕<br>");
			return;
			};
		var vid = obj[index]["vid"];
		$.ajax({
	        url:"/static/"+t+"/vid/"+vid+"/d/"+d+"/",
	        cache: false,
	        success: function(html){
				$("#divtablelist").prepend("<a target='_blank' href='"+html+"'>"+html+"</a><br>");
				$.next();
	        }
	    });
		index++;		
	}
});
var json={$info};
var d=$.g();
var obj=null;
var t=null;	
var index=0;
$(document).ready(function() {
	if(!json)return;
    if(json["vod"]){
    	obj = json["vod"];
    	t="vod";
    }
    else if(json["live"]){
    	obj = json["live"];
    	t="live";
    }
    if(!obj)return;
    $("#divtablelist").prepend("开始生成文件<br>");
    $.next();
});
</script>
</head>
<body >
<h1>
<span class="action-span1">生成详细页</span>
<div style="clear:both"></div>	
</h1>
<div class="form-div">
	{loop $typeInfos $k $v}
		<a href="/static/createdetail/typeid/{$v['id']}">{$v["typename"]}</a> | 
	{/loop}
</div>
<div id='divtablelist'>

</div>
<div id="pager" style='align:center;' /></div>
<div style="clear:both"></div>
{template 'footer.html'}
</body>
</html>